﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace DIT.Utility
{
    public class DITConfig
    {
        private static DITConfig config = null;
        private static object _lock = new object();
        private DITConfig()
        {
        }
        public static DITConfig AppSettings
        {
            get
            {
                lock (_lock)
                {
                    if (config == null)
                        config = new DITConfig();
                    return config;
                }
            }
        }

        public string this[string key]
        {
            get
            {
                try
                {
                    string value = ConfigurationManager.AppSettings[key];
                    return value ?? key;
                }
                catch
                {
                    return key;
                }

            }
        }
    }
}
